library(car) library(MASS) source("Steiger R Library Functions.txt") spss.data <- read.table("spss.discrim.txt",header=T,sep = ",") fb.data <- read.table("football.txt",header=T,sep=",") iris.data <- read.table("IrisData.txt",header=T) ## FB Data ## Group 1 = HS fb player ## Group 2 = College fb player ## Group 3 = not a fb player ## spss Data ## Group 1 = customer service ## Group 2 = mechanic ## Group 3 = dispatcher ## Iris Data ## Group 1 = Virginica ## Group 2 = Versicolor ## Group 3 = Setosa ## Analyze FB data first ## ################################## ## Create x,D,H,and Group matrices ##################################### names(fb.data) x <- as.matrix(fb.data[,2:7]) Group <- as.matrix(fb.data[,1:1]) DiscriminantAnalysis(x,Group) ## Analyze SPSS data ## ################################## ## Create x,D,H,and Group matrices ##################################### names(spss.data) x <- as.matrix(spss.data[1:3]) Group <- as.matrix(spss.data[,4:4]) DiscriminantAnalysis(x,Group) ## Analyze Iris Data -- TRY IT!